<?php 

require_once 'framework/Kernel/App.php';
// 框架入口

class Hd
{
	public static function run()
	{
		// echo 'ok';exit;
		if (!is_dir('app')) {
			self::mkdirs();
			self::copyFile();
		}
		// 运行应用
		(new \Framework\Kernel\App)->run();
	}

	public static function mkdirs()
	{
		// echo 'ok';exit;
		
		$dirs=[

			'app',//项目目录
			'app/Common/',//公共数据
			'app/Common/Conf',//网站配置
			'app/Home',//主页
			'app/Home/Conf',
			'app/Home/Model',
			'app/Home/View',
			'app/Home/Controller',
		];

		foreach ($dirs as $d) {
			is_dir($d)||mkdir($d,0777,true);
		};
	}

	public static function copyFile()
	{
		copy('framework/Common/IndexController.php','app/Home/Controller/IndexController.php');
		copy('framework/Common/config.php','app/Home/Conf/config.php');
		copy('framework/Common/config.php','app/Common/Conf/config.php');

	}

	
}
Hd::run();



 ?>